<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        body{
            width: 100%;
            height: 100%;
        }
        .game{
            width: 100%;
            height: 500px;
            border: 2px solid #000;
            margin: 0 auto;
            position: relative;
            overflow: hidden;
        }
        .game .sky{
            height:100%;
            width:200%;
            background: url(img/sky.png);
            /* 背景默认repeat */
            position: absolute;
            left:0;
            top: 0;
        }
        .game .land{
            height:112px;
            width:200%;
            background: url(img/land.png);
            position: absolute;
            bottom: 0;
        }
        .game .bird{
            width: 33px;
            height: 26px;
            position: absolute;
            left:150px;
            top: 150px;
            background: url(img/bird.png);
            background-position:-8px -100px;
        }
        .pipe{
            position: absolute;
            width:52px;
        }
        .up{
            background: url(img/pipeDown.png) no-repeat;
            background-position: left bottom;
        }
        .down{
            background: url(img/pipeUp.png) no-repeat;
            background-position: left top ;
        }

        p{
            text-align: center;
        }
        .over{
            position: absolute;
            width: 100%;
            height: 100%;
            left: 0;
            top: 0;
            background: rgba(0,0,0,0.5);
            z-index:10;
            line-height: 600px;
            color:#fff;
            font-size: 5em;
            text-align: center;
            display: none;
        }
        .controller{
            height:500px;
            width: 100%;
            display: flex;
        }
        .controller-button{
            width: 50%;
            height: 100%;
            background-color: red;
        }
    </style>
</head>
<body>
    <div class="game">
        <div class="sky"></div>
        <div class="land"></div>
        <div class="bird"></div>
        <div class="over">游戏结束</div>
    </div>
    <p>回车键开始/暂停，空格键跳跃</p>
    </div>
    <script src="bird.js"></script>
</body>
</html>